<?php

namespace app\common\model;

use app\common\model\CommonModel;

class DataSettingModel extends CommonModel{

    protected  $name = 'data_setting';

    protected  $pk   = 'k';

    protected  $type = [

                         'v' => 'array'

                        ];

    

    public function  fetchAll(){

        $datas = $this->select()->toArray();

        $return = [];

        foreach($datas as $val){

            $return[$val['k']] = $val['v'];

        }

        return $return;

    }

}